from django.db import models
from django.contrib.auth.models import AbstractUser
from datetime import datetime
from django.conf import settings


class User(AbstractUser):
    """用户模型类"""
    # 增加 mobile 字段
    mobile = models.CharField(max_length=11, unique=True, verbose_name='手机号')
    avatar = models.ImageField(null=True,blank=True,verbose_name='用户头像')
    real_name = models.CharField(max_length=32,null=True,verbose_name='真实姓名')
    id_card = models.CharField(max_length=18,null=True,verbose_name='身份证号')

    class Meta:
        # 表名
        db_table = 'tb_user'
        verbose_name = '用户'
